﻿@using Xunit;
@inherits TestContext
@code
{
    public FluentDividerTests()
    {
        JSInterop.Mode = JSRuntimeMode.Loose;
        Services.AddSingleton(LibraryConfiguration.ForUnitTests);
    }

    [Fact]
    public void FluentDivider_Default()
    {
        // Act
        var cut = Render(@<FluentDivider />);

        // Assert
        cut.Verify();
    }

    [Fact]
    public void FluentDivider_Separator()
    {
        // Act
        var cut = Render(@<FluentDivider Role="DividerRole.Separator" />);

        // Assert
        cut.Verify();
    }

    [Theory]
    [InlineData(DividerRole.Separator, Orientation.Horizontal)]
    [InlineData(DividerRole.Presentation, Orientation.Horizontal)]
    [InlineData(DividerRole.Separator, Orientation.Vertical)]
    [InlineData(DividerRole.Presentation, Orientation.Vertical)]
    public void FluentDivider_RoleOrientation(DividerRole role, Orientation orientation)
    {
        // Act
        var cut = Render(@<FluentDivider Role="@role" Orientation="@orientation">My content</FluentDivider>);

        // Assert
        cut.Verify(memberName: $"{nameof(FluentDivider_RoleOrientation)}_{role}_{orientation}");
    }
}
